#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTimer>
#include <QMenu>
#include <QTcpSocket>
#include <QThreadPool>
#include "dboperate.h"
#include "logview.h"
#include "areaconfigureview.h"
#include "nodeconfigureview.h"
#include "accountmanageview.h"
#include "gatewayconfigureview.h"

namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();

private slots:
    void on_exitButton_clicked();

    void on_logButton_clicked();

    void on_systemSettingButton_clicked();

    void on_expandAllButton_clicked();

    void on_collapseAllButton_clicked();

    void on_accountManageButton_clicked();

private:
    Ui::Widget *ui;
    QTimer *timer;
    QMenu *menu;
    NodeConfigureView *nodeConfView;
    AreaConfigureView *areaConfView;
    LogView *logView;
    QVector<AreaInfo> areasInfo;
    QVector<NodeInfo> nodesInfo;
    QVector<QPushButton *> areasButton;
    QVector<QPushButton *> nodesButton;
    //QThreadPool *threadPool;
    QVector<QJsonObject> *gatewaysConf;
};

#endif // WIDGET_H
